Image processing apparatus including binary data producing unit

ABSTRACT

An image data processing apparatus binary-codes an image signal obtained from an image sensor of the CCD type or the like so as to output a binary-coded image signal. The image signal obtained from the image sensor A/D-converted into digital image data. Based upon the digital image data, average values of luminance values of the digital image data are calculated for an array of pixels in a preselected area of the CCD. This average value is used as a threshold level for binary coding the image data for these pixels at the center portion of this preselected area. Furthermore, to detect coutours this data processing apparatus calculates a gradient in the luminance values of the pixels in a portion of the preselected area of the CCD in an X direction and a Y direction, and the gradient value is used to obtain binary-coded data in accordance with the above-described method.

This application is a Continuation of application Ser. No. 07/896,337,filed Jun. 10, 1992, which is a Continuation of Ser. No. 07/513,566filed Apr. 24, 1990 now abandoned.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a binary-coded image informationproducing apparatus used in black/white copiers, facsimiles, and otherelectronic products.

2. Description of the Related Art

Up to now, various methods and systems have been proposed by whichbinary-coded image information can be obtained from analog imageinformation. In general, most of these binary coding methods/systems aimto more accurately represent an original image, by which a half toneimage can be represented as a quasi-half tone image.

As the above-described quasi-half tone image producing method such aquasi-half tone image has been represented by obtaining a binary codedimage, while varying a dot number within a predetermined area inresponse to a tone of an original image.

However, for some practical applications it is necessary that only acertain portion of interest contained in an original image must beduplicated as a sharp image. For instance, when the portion of interestphotograph is only the black alpha-numeric characters included in it,difficulties arise in reproducing the characters well with such binarycoding methods capable of representing a quasi-half tone image. That is,it is sometimes difficult to discriminatively represent theseblack-colored characters printed on the quasi-half tone image. Thereasons are as follows. Since, as previously described, the dot quantityof the image is varied in accordance with the tone of the originalimage, there is no change in the dot quantities of both the charactersand background portion in case that practically no difference exists inthe tones between the characters and background.

Furthermore, a tone of an area around a contour of characters and abackground thereof is represented based upon dot quantities of thesecontour and background so that the sharpness of the character contour isdeteriorated. In such a case, a binary coding method capable ofaccurately and sharply reproducing the alpha-numeric characterscontained in an original image is preferable to a binary coding methodwhich is meant to be capable of correctly reproducing the entireoriginal image.

SUMMARY OF THE INVENTION

A primary object of the present invention is to provide a binary-codedimage information producing apparatus capable of sharply reproducing aspecific portion contained in an original image and, in particular,alpha-numeric characters and the like.

To achieve the above-described object of the present invention, an imageprocessing apparatus of the invention comprises;

image sensing means having a plurality of photoelectric convertingelements, for outputting electric signals of an optical image convertedby said photoelectric converting elements;

selecting means for selecting said electric signals produced by apredetermined number of said photoelectric converting elements, insequence;

arithmetic means for producing an average value of said electric signalsselected by said selecting means; and,

binary data producing means for producing binary data in response to atleast one of said electric signals (at a center) of said electricsignals selected by said selecting means with said average valueproduced by said arithmetic means as a threshold value.

Further, the above-described object may be achieved by providing animage processing apparatus according to the present invention,comprising:

image sensing means having a plurality of photoelectric convertingelements for outputting electric signals of an optical image convertedby said photoelectric converting elements in a predetermined order;

difference-value signal producing means for producing difference-valuesignals according to a difference in amounts of said electric signalsoutput from said image sensing means;

first binary data output means for outputting one-leveled data of firstbinary data after said difference-value signals produced by saiddifference-value signal producing means become more than a firstpositive reference value, and for outputting another-leveled data ofsaid first binary data after said difference-value signals produced bysaid difference-value signal producing means become more than a firstnegative reference value;

second binary data output means for outputting one-leveled data ofsecond binary data after said difference-value signals produced by saiddifference-value signal producing means become more than a secondpositive reference value which is less than said first positivereference value, and for outputting another-leveled data of said secondbinary data after said difference-value signals produced by saiddifference-value signal producing means become less than a secondnegative reference value which is more than said first negativereference value; and,

addition means for adding said second binary data output from saidsecond binary data output means, while said first binary data outputmeans outputs one of one-leveled data and another-leveled data to saidfirst binary data output from said first binary data output means.

BRIEF DESCRIPTION OF THE DRAWINGS

The above-described object and features of the present invention may beunderstood by the following descriptions with reference to theaccompanying drawings, in which:

FIG. 1 is a perspective view of a compact copier employing a binarycoding circuit according to a preferred embodiment of the presentinvention;

FIG. 2 is a front view, partially in sectional view of the compactcopier shown in FIG. 1;

FIG. 3 is a schematic block diagram showing the internal arrangement ofthe compact copier shown in FIG. 1 including its structural componentsand circuitry;

FIG. 4 schematically illustrates a pixel arrangement of the image sensorshown in FIG. 3;

FIG. 5 is a flowchart for explaining a binary coding operation ofconcentration performed by the circuit shown in FIG. 3 to determinephotographic density;

FIG. 6 is a flowchart for explaining a binary coding operation effectedby the circuit shown in FIG. 3 to determine contour;

FIGS. 7A and 7B schematically illustrate a basic idea relating to thebinary coding operation of the contour detection carried out in thecompact copier represented in FIG. 1;

FIG. 8 is a schematic block diagram of a circuit arrangement of anotherbinary coding circuit according to a second preferred embodiment of thepresent invention; and,

FIGS. 9A to 9F are signal waveform graphs for representing outputwaveforms of major circuit portions in the binary coding circuit shownin FIG. 8.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Construction of Compact Copier

In FIG. 1, there is shown a perspective view of a compact copyingmachine, or copier, the exterior of which is formed by a housing case10. This housing case 10 is constructed of a photographing unit 10a anda printing unit 10b. A lens 11 used for a photographing operation isprovided in a front surface of the photographing unit 10a so as tooptically form an image to be copied. At an upper surface of thisphotographing unit 10a, there are provided: a release switch 12 forstarting a photographing process of an image to be copied and a printingprocess thereof; a mode changing switch 13 for changing a photographingmode into a printing mode and vice versa; and a copy mode instructionswitch 14 for selecting either a contour copy mode or a normal copy mode(as explained below).

FIG. 2 illustrates an arrangement of a printer 15 employed in theprinting unit 10b of this copying machine. A paper supply roller 16 onwhich a heat sensitive recording paper "P" has been wound is employedinside this printer 15. Thus, the recording paper "P" is stored on thisroller 16 and fed out from the housing case 10 of the copying machinewhile being pinched between rotating rollers 17a and 17b. Between therotating roller 17a and paper supply roller 16, a thermal head 18 isprovided under the condition that this head 18 is forcibly urged intocontact with a heat sensitive recording surface of the recording paper"P" by a spring 19. The output timing of the print data by the thermalhead 18 is controlled in accordance with a paper feed speed of therecording paper "P" defined by the rotating roller 17a.

When it is desired to use the above-described compact copying machine 10to duplicate an original, the mode selecting switch 13 is set to thephotographing mode. After an image of the original is opticallyphotographed while observing it through a viewfinder (not shown in thedrawings), the release switch 12 is depressed. Then, the image to becopied is optically focused onto a solid-stage imaging element (will bediscussed later) provided within the photographing unit 10a to producean analog signal which is thereafter converted into digital data andstored in an electronic memory. Subsequently, the mode selecting switch13 is set to the printing mode and the release switch 12 is depressed.Accordingly, the stored image data obtained of the original image withthe photographing unit 10a are successively output to the thermal head18 of the printer 15 and printed out on the recording paper "P".

In this case, when the normal duplication (copy) mode is previouslydesignated by the copy mode instruction switch 14, the image data arebinary-coded in accordance with the density thereof and printed out onthe recording paper "P". When the contour duplication mode isdesignated, the image data are binary-coded in such manner that theentire image region is subdivided into a region where a difference inthe density is rapidly changed, and also another region having norapidly changing density. Then, the image data of both regions areprinted out on the recording paper "P".

Circuit Arrangement of Compact Copier

FIG. 3 shows an electronic circuit arrangement of the above-describedcompact copying machine. A control unit 20 is employed so as to controlvarious operations of circuits thereof in response to a key operationsignal and a switch operation signal derived from a key and switch 12,13 and 14.

In the photographing mode, an optical image incident upon thephotographing lens 11 is focused onto an image sensor 23 via a diaphragm22. This image sensor 23 is, for instance, a solid-state imaging (imagepickup) element (referred to as a "CCD") having a 1/2 inch size and390,403 pixels (509×767 picture elements). The image sensor 23 is drivenby an image sensor drive unit 24 into which the above-described controlsignal is supplied from the control unit 20. The diaphragm 22 is alsodriven by a diaphragm drive unit 25 into which the control signal isfurnished from the control unit 20. An exposure calculation unit 26 isconnected to these image sensor drive unit 24 and diaphragm drive unit25. The function of this exposure calculation unit 26 is to obtain anoptimum exposure value based upon brightness around an image to becopied (i.e., a subject to be imaged) which is photometric-measured by aphotometric unit 27. Accordingly, both the above described image sensordrive unit 24 and diaphragm drive unit 25 drive the image sensor 23 anddiaphragm 22 in accordance with a shutter speed and an open degree ofthe diaphragm which are set based upon the above-described optimumexposure value, and also automatically adjust both an exposing time forthe image sensor 23 and the open degree of the diaphragm.

The photographing lens 11 is driven by a lens drive unit 28. An AFcontrol unit 29 is connected to this lens drive unit 28, into which thecontrol signal is supplied from the control unit 20. The function ofthis AF control unit 29 is to measure an optimum focal length byutilizing, for instance, an ultrasonic reflection from the image to becopied. Based upon the measured optimum focal length, the lens driveunit 28 drives the lens 11 and automatically adjusts the focal length.

The image sensor 23 generates analog image signals which are output withlevels corresponding to the densities of the focused images detected ateach of its pixels. These are input via an amplifying/signal processingunit 30 to an A/D (analog-to-digital) converting unit 31. The functionsof the above-described amplifying/signal processing unit 30 are toamplify the analog image signals supplied from the image sensor 23 to apredetermined voltage level, to remove such a frequency component higherthan a frequency A/D-convertable in the A/D converting unit 31, and alsoto clamp the black-level voltage at a reference voltage at a negativevoltage side of this A/D converting unit 31. The A/D converting unit 31converts the analog image signals input from the respective pixels ofthe image sensor 23 into 6-bit digital data. The digital image dataoutput from this A/D converting unit 31 are successively supplied to afirst image data memory unit 32 and stored therein. A memory capacity ofthis first data memory unit 32 corresponds to at least (509×767) of theimage sensor 23. A write address used for this first image data memoryunit 32 is designated via a memory control unit 34 by a DMA (directmemory access) control unit 33.

In the above-described photographing mode, the image data which havebeen stored in the first image data memory unit 32, are processed in acalculation unit 35 to which a calculation control signal is suppliedfrom the control unit 20. That is, a binary coding process for either aphotographic density, or a contour of the image data is performed in thecalculation unit 35 under the control of the control-unit 20.Accordingly, the processed image data are transferred as binary codedimage data having "1(black)" or 0 (white)" level to a second image datamemory unit 36. In this case, both a read address and a write addressfor the first image data memory unit 32 and second image data memoryunit 36 are designated from an address calculation unit 37 to which thecontrol signal is supplied from the control unit 20.

Binary-Coding of Imaging Area

FIG. 4 illustrates an arrangement of pixels in the imaging area of theimage sensor 23. It should be noted that for the sake of simpleexplanation of FIG. 4, "I" and "J" are determined as coordinatesrepresentative of the areas of the three pixels, and furthermore, "i"and "j" are determined as coordinates indicative of the respectivesignal pixels within the three pixels represented by "I" and "J". Abrief review of binary coding based on this invention will now beprovided, with a detailed discussion.

As to the photographic density binary coding process of the image datastored in the memory unit 32, data corresponding to a 9×9 pixel area ofthe image sensor 23 is retrieved from the memory unit 32, and acalculation is performed by the calculation unit 35 to obtain an averagevalue "A" of the photographic density in the 9×9 pixel area. Thecalculated average density calculated value "A" is used as a thresholdvalue for binary coding (in a manner described below in detail) each ofthe image data in a 3×3 pixel area at the center of the 9×9 pixel area.Thereafter, the 9×9 pixel area used for binary coding of the respectiveimage data on the 3×3 pixel area at its center is successively moved by3-pixel increments, first along a horizontal direction and then along avertical direction of a pixel array, and the above-described calculationis repeated for each such 9×9 pixel area. As a result, all of the imagedata of all pixels except for a 3-pixel wide strip along the peripheryof the image sensor can be binary-coded in this way.

With respect to the contour binary coding process for the image data,first of all, absolute values are calculated for a 3×3 pixel area from(1) a difference in photographic densities between the 3 pixels formingthe left side and the 3 pixels forming the right side of the 3×3 pixelarea, and (2) a difference in photographic densities between the 3pixels forming the top row and the 3 pixels forming the bottom row bythe 3×3 pixel area. Then, these absolute values are summed with eachother, and the resultant value is used as the density gradient value forthe center pixel of this 3×3 pixel area. Subsequently, such a settingprocess of the density gradient value of the center pixel in this 3×3area is successively moved by 1 pixel increments along both thehorizontal and vertical directions of the pixel array and thecalculation is repeated, so that finally, the density gradient values ofall the respective pixels except for 1 pixel wide area around theperiphery of the entire image sensor 23 have been set. Thereafter, thedensity binary coding process described above is similarly executed onthe image data derived by setting the density gradient values to therespective pixels. As a result, all of the image data except for the 1pixel wide area around the periphery of the image sensor can beprocessed with respect to the contour binary coding to discern theportion of the original having the large density gradient from theremaining portion.

The binary-coded image data which have been processed for either thedensity binary process or contour binary process, and stored in thesecond image data memory unit 36, are successively read out therefrom inresponse to the operation signals of the release switch 12 in theprinting mode, and thereafter transferred to the printer control unit38. This printer control unit 38 performs the temperature control of thethermal head 18 in response to the control signal derived from thecontrol unit 20. The image data output via the printer control unit 38are transferred to the printer 15, and thus printed out as an image onthe recording paper "P" in synchronism with the paper feed speed of thisrecording paper "P".

Operations of Compact Copier

Various operations of the above-described compact copying machine withthe above-described arrangements will now be described.

When, for instance, a three-dimensional image is copied by utilizingthis compact copying machine, the mode selecting switch 13 is set to thephotographing mode, and after the three-dimensional image to be copiedis optically captured while observing this image through the viewfinder(not shown), the release switch 12 is depressed. Thus, this image isoptically focused onto the image sensor 23 employed within thephotographing unit 10a, through the phtographing lens 11. In this case,the automatic exposure control is performed by the exposure calculationunit 26 via the image sensor drive unit 24 and diaphragm drive unit 25.Also the automatic focusing control is performed by the AF control unit29 via the lens drive unit 28.

Now, it should be understood that electric charges corresponding to thedensities of the three-dimensional image to be copied have been storedwith respect to the respective pixels of the image sensor 23.

When the image has been focused onto the image sensor 23, the imagesignals are sequentially output via the amplifying/signal processingunit 30. Then, these analog image signals are converted into the 6-bitdigital image data, and thereafter the 6-bit digital image data arestored into the first image data memory unit 32. It should be noted thatthe digital image data stored into the respective memory regions of thefirst image data memory unit 32 corresponds in value to the analogcharge levels stored into the respective pixels of the image sensor 23.

Density Binary-Coding Process

In case that the normal copying mode is designated by the copying modeinstruction switch 14, the density binary coding process is carried outof the image data which have been derived when the original wasphotographed, and then stored into the first image data memory unit 32.FIG. 5 shows a flowchart for explaining the density binary-codingprocess of the image data as carried out by the calculation unit 35. Atfirst, an initialization I=0, J=0 is performed with respect to thearrangement of the imaging area, shown in FIG. 4, corresponding to thememory area of the first image data memory unit 32 (step A1). It shouldbe noted that the above-described "I" and "J" as represented in FIG. 4,indicate a coordinate of three pixels which are handled as a single unitand extending in the horizontal and vertical directions, respectively.Also, "i" and "j" (will be discussed later) represent a coordinate ofeach of pixels. Then, an average value "A" of density of a 9×9 pixelarea is set equal to zero (0) and a reference position of the pixel isdetermined as i=1 and j=1 (step A2). The average density values of therespective 3×3 pixel areas within the 9×9 pixel area are calculatedunder the condition that A=S/9+A (step A3). It should be noted that "S"corresponds to a total of the density data of the respective pixelswithin the above-described 3×3 area, and is calculated by the followingequation (1): ##EQU1##

Thus, when the density average value "A" of the 3×3 area 100 positionedat the upper and left side with respect to the 9×9 pixel area, the pixelreference position is advanced by three pixels in the I direction underthe condition that i=i+3 (step A4). At this time, since i=4, a "NO"judgement is made in a step A5, and the density binary-coding process isagain returned to step A3. At this step A3, a summation is carried outbetween the density average value S/9 of the 3×3 area 101 positioned atthe upper and center position of the above-described 9×9 pixel area, andthe average density value calculated previously (in this case, theaverage density value of the 3×3 area 100) under the condition that thepixel position of i=4 is understood as the reference. Thereafter, thepixel reference position is advanced by 3 pixels in the I directionunder the condition that i=i+3 (step A4). At this time, since i=7, a"NO" judgement is made at the step A5. Accordingly, the coding processis again returned to the step A3. At this step A3, another summation isexecuted between the average density value "A" previously calculated andthe density average value S/9 of the 3×3 area 102 positioned at theupper and right position of the above-described 9×9 area under such acondition that the pixel position of i=7 is used as a reference. Inother words, this density average value "A" is equal to a value obtainedby adding the three density average values, i.e., the density averagevalue of the 3×3 pixel areas 100, 101 and 102.

When i=i+3 is again applied by step A4, it yields i=10. Accordingly, a"YES" judgement result at a step A5 causes the binary coding process toadvance to step A6. At this step A6, the pixel reference position in theI direction is again returned to i=1, whereas the pixel referenceposition in the J direction is equal to j=j+3, and it is advanced bythree pixels in the J direction. At this time, since j=4, a "NO"judgement is made at a step A7, and the coding process is again returnedto the previous step A3. At this step A3, the average density value S/9of the 3×3 area 103 positioned at the center and left side of the 9×9pixel area is summed with the addition result "A" of the densityaverages of the previously calculated areas 100, 101 and 102 under thecondition that the pixel position of i=1 and j=4 is used as thereference. Also at the step A4, as i=i+3, the pixel reference positionis advanced by 3 pixels along the I direction where a calculation ismade of the average density value S/9 of the 3×3 area 104 positioned atthe middle and center of the 9×9 area under the condition that the pixelposition of i=4, j=4 is used as a reference. The resultant averagedensity value is added to the above-described addition result "A".

Since the above-described steps A3 to A7 are repeatedly executed, theaverage density values of the respective 3×3 areas 100 to 108 which havebeen obtained by dividing the 9×9 area into 9 groups are calculated andthe addition value of the average density values of these 9 areas isgiven as "A". Subsequently, at a step A8, as A=A/9, the average densityvalue "A" is calculated for the entire 9×9 area.

In step A9, the following values are set: I=I+1, J=J+1, i=0, j=0. Then,the binary coding process is advanced to a step A10 in which a judgementis made relative to f(I+i, J+j). In other words, for I=1 and J=1, as setby step A9, a judgement is made whether or not the image density of asingle pixel 109 positioned at the upper and left side of the centrallylocated 3×3 area 104 is higher than the average density value "A" forthe entire 9×9 area. Let us assume that at this step A10, a judgement ismade "NO". In other words, it is judged that the image density of thesingle pixel 109 is thinner than the above-described average densityvalue "A". Then, the density binary coding process is advanced to a stepA11a, where the binary-coded data g(I+i, J+j) equal to "0" (white) isassigned to this pixel. Let us now assume that at the step A10, anotherjudgement is made "YES". That is, a judgement is made that the imagedensity of the single pixel 109 is darker than the above-describedaverage density value "A". Then, the process is advanced to a step A11bin which binary-coded data g(I+i, J+j) equal to "1" (black) is assignedto this pixel. Then, the above-described binary-coded data "0" or "1" iswritten into the memory area corresponding to the second image datamemory unit 36 (step A12). Thus, at a step A13, the pixel referenceposition i=i+1 is advanced in the I direction by 1 pixel, and at thistime since i=1, then a "NO" judgement is made at a step A14, and theprocess is again returned to the step A10. Thereafter, at the steps A10to A12, the density data on the single pixel 110 positioned at the upperand center of the 3×3 pixel area with respect to the center of the 9×9area, is binary-coded based upon the above-described average densityvalue "A" in the same manner as just described for pixel 109, and thebinary-coded data "0" or "1" assigned to pixel 110 is written into thesecond image data memory unit 36. Then, at the step A13, i=i+1 and atthe step A14, a "NO" judgement is made. Accordingly, the process isreturned to the previous step A10. In this case, the density data on thesingle pixel 111 positioned at the upper and right of the 3×3 area withrespect to the center of the 9×9 area is binary-coded based upon theabove-described density average value "A". Furthermore, the resultantbinary-coded data "0" or "1" assigned to pixel 111 is written into thememory area corresponding to the second image data memory unit 36.Subsequently, at a step A13, i is made equal to i+1 so that now i=3.Then a "Yes" judgement is made at step A14, and the process proceeds tostep A15 where the pixel reference position i is returned to 0 and thedensity binary-coding process is advanced to j=j+1. At this time, sincej=1, a "NO" judgement is made at step A16. The process is returned tothe above step A10. As a result, the density data on the single pixel112 positioned at the middle and left side of the 3×3 area with respectto the center of the 9×9 area corresponding to the above i=0 and j=1, isbinary-coded based upon the above-described density average value "A" atthe step A11. At the next step A12, the binary-coded data assigned topixel 112 is written in the memory area corresponding to the secondimage data memory unit 36. Thus, the above-described binary codingprocess steps A10 to A16 are repeated so that the density of each of the9 pixels constituting the 3×3 area 104 is binary-coded, and the binarycoded data for these pixels is successively written into the secondimage data memory unit 36.

Then, when the above-described density binary coding process is carriedout for single pixels 113 to 117, the process is advanced to i=3 at astep A13 and j=3 at a step A15. As a consequence, "Yes" judgements aremade at steps A14 and A16. Then, the process is advanced to step A17where J=J-1. It will be recalled that the value of J was increased by 1in step A9 for use in steps A10 and A11. Step A17 returns J to itsprevious value so that further processing in the same row can continue.Although the value of I was also increased by step A9, this is necessaryin order to advance the processing to the next 9×9 pixel area for binarycoding of the subsequent 3×3 pixel area. If at step A17 I does notexceed 253, a "NO" judgement is made at a step A18, and the process isagain returned to the previous steps A2.

That is, since the density binary coding process defined at the steps A2to A18 is repeated, the density binary coding for the respective pixelswithin the 3×3 pixel area 104 with respect to the center of the 9×9pixel area is successively performed along the I direction in 3 pixelsteps, and is continued until I=254. At this time, all of the pixel datahaving the respective densities within the 3×3 area 104 (for each 9×9pixel area) are binary coded for I between 1 and 254 and J=1, and thebinary coded pixel data are stored in the second image data memory unit36. Thereafter, the process is advanced to a step A19, where I isreturned to 0 and the process is advanced to the next row J=J+1, theabove-described processes defined at the steps A2 to A18 are repeated,and all of the pixel data of the 3×3 areas are binary-coded until J=2and I=1 to 254, and thus are stored in the second image data memory unit36. Thereafter, the return of I to 0 is repeatedly executed, and theadvance process of J=J+1 is repeatedly performed at a step A19. When "J"reaches 167, a "NO" judgement is made at a step A20. As a consequence,the density binary coding process has been accomplished for all of thepixels except for the 3-pixel wide area around the periphery of theimage sensor 23, and the binary coded pixel data have been stored in thesecond image data memory unit 36.

Even if there is a small density difference between a character and abackground thereof, e.g., a black-colored character is written in ared-colored background, since the average density value of the 9×9 pixelarea is used as the threshold level and the respective pixels within the3×3 pixel area which is positioned at a center of the above-described9×9 pixel area are binary-coded in the above-described densitybinary-coding process, both the character portion and background portion(in particular, at the boundary portion) can be binary-processed asclearly different data (black or white). This is because the binarycoding operation is performed based upon the density of the charactersand the average density of the background portion.

Contour Binary-Coding Process

Under the conditions that the digital data having the valuescorresponding to the densities of the image to be copied have beenwritten in the first image data memory unit 32, in case that the contourduplication mode is designated by a duplication mode designation switch14, the contour binary coding process is performed for the image datawhich have been acquired and stored into the first image data memoryunit 32.

FIG. 6 is a flowchart for representing a contour binary-coding processof the image data. An initialization of i=1, j=1 is performed for thearrangement of the imaging area shown in FIG. 4, corresponding to thememory area of the first image data memory unit 32 (step B1). Referringto FIG. 4, the 3×3 pixel area 104 will be used as an example to explainthis aspect of the invention because its pixels have been individuallynumbered. However, the same steps are carried out for each of the 9 3×3pixel areas within a 9×9 pixel area. A calculation is executed so as to,firstly, obtain a density difference Δxf(i, j) in the x directionbetween 3 pixels 109, 112 and 115 positioned at the left side of the 3×3pixel area 104, and 3 pixels 111, 114 and 117 positioned at the rightside thereof and to, secondly, obtain a density difference in the ydirection between 3 pixels 109, 110 and 111 positioned at the upper sideof the same 3× 3 pixel area 104 and 3 pixels 115, 116 and 117 positionedat the lower side thereof (step B2). These density differences in the Xdirection and the Y direction for this 3×3 pixel area are calculated bythe following equations (2) and (3): ##EQU2##

Thus, when both the density difference Δxf (i, j) in the X direction andthe density difference Δyf (i, j) in the Y direction in theabove-described 3×3 area are obtained, a value obtained by summing anabsolute value of the density difference in the X direction with anotherabsolute value of the density difference in the Y direction, is set tobe a density gradient value of central pixel 113 of this 3×3 pixel area104. Then, the density gradient value is written into a memory area ofthe corresponding second image data memory unit 36 (steps B3 and B4).

    g(i, j)=|Δxf(i, j)|+|Δyf(i, j)|                                              equation (4)

Thereafter, at a step B5, the contour binary coding process is advancedto a pixel reference position (i=i+1). Until this "i" exceeds 766, thedensity gradient setting process with respect to the central pixel ofthe 3×3 area defined in the above-described steps B2 to B4 issuccessively repeated in such a manner that this process is shifted inthe I direction by 1 pixel increments (step B6).

Thereafter, a "YES" judgement is made at a step B6. In other words, "i"is equal to 767 when the density gradient value setting process for thepixel corresponding to (i=766, j=1) is completed. Subsequently, when theprocess is advanced to a step B7, the value of i is returned to 1, and jis incremented by j=j+1. At this time, since j=2, a "NO" judgement ismade at a step B8, and thus the process is returned to a step B2.Accordingly, at these steps B2 to B4, the density gradient settingprocess with respect to the pixel position of (i=1, j=2) is performed.Furthermore, the process defined at the steps B2 to B6 is repeated sothat all of the density gradient values are set until the pixel array inthe I direction being equal to i=766 as j equals 2. Then, as the processdefined by the steps B2 to B8 is repeated, the density gradient settingprocess for the above-described 1 pixel increments (i=1 to 766) in the Idirection is successively repeated in such a manner that this processoperation is shifted by 1 pixel in the J direction. As a result, thedensity gradient setting process with respect to all of the pixelsexcept for the 1 pixel area around all of the image sensor 23 isaccomplished, and the resultant density gradient data are stored intothe second image data image unit 36.

In accordance with the above-described process operation, after thedensity gradient value setting process with respect to 1 pixelincrements based upon the density difference within the 3×3 area for thephotographed image data has been completed, the data on the image to becopied corresponding to this density gradient are transferred from thesecond image data memory unit 36 to the first image data memory unit 32(step B9). Then, with respect to the image data to which the densitygradient values have been set at a single pixel unit and which have beenstored in this first image data memory unit 32, the density binarycoding process defined in the flowchart shown in FIG. 5 is performed. Asa consequence, both the image data having the large density gradientsand the image data having the normal density gradient arecontour-binary-coded except for the 1 pixel wide area around the entireimage, and the coded image data are stored into the second image datamemory unit 36 (step A).

Basic Idea of Contour Binary-Coding Process for Image Data

Referring now to FIGS. 7A and 7B, a basic idea of a contour binarycoding process for image data will be described.

A region where a density gradient of image data in either the Xdirection, or Y direction is rapidly changed as is shown in FIG. 7A, isrecognized as a density difference thereof Δx or Δy as is shown in FIG.7B. This density difference data is averaged so as to producebinary-coded data thereof. That is to say, the data on the portion ofthe original in which the color of the image varies, read out by theimage sensor 23, is represented as a density distribution as shown inFIG. 7A in accordance with the reflectance of this color. Then, adensity difference as represented in FIG. 7B is formed based upon theabove-described density distribution. As the density difference isbinary-coded, the changing point of the color may be represented asblack (1-level) data, whereas other portions may be indicated as white(0-level) data.

As a result, this image is finally obtained as a contour image.

It should be noted that the address control for both the first imagedata memory unit 32 and second image data memory unit 36 is carried outunder the control of the address control unit 37 during both the densitybinary-coding process and contour binary-coding process in response tothe control signal derived from the control unit 20. Also, the densitycalculation binary-coding process is executed in the calculation unit 35in response to the calculation control signal derived from the controlunit 20.

To print out the image data which have been processed by either thedensity binary-coding operation, or the contour binary-coding operation,and thereafter stored into the second image data memory unit 36, firstof all, the mode selecting switch 13 is set to the printing mode and therelease switch 12 is depressed. Then, the binary-coded image data of theimage to be copied which have been stored in the second image datamemory unit 36 are read out as print data to the print control unit 38.Thus, the print data are sequentially transferred to the thermal head 18in response to the feeding speed of the heat sensitive recording paper"P". As a result, the image to be copied is printed out on the recordingpaper "P" under the condition that the densities thereof are convertedinto black/white conditions, or the contour of the image is convertedinto the black condition. As previously described, since both thecharacter portion and background portion can be converted into clearlydifferent data (i.e., black or white data) in case that the binarycoding operation is carried out by way of the density binary-codingprocess, even when both the colors of the characters and background arerelatively equal densities with each other, the characters can becorrectly or accurately reproduced without deteriorating the contourthereof as in the conventional quasi-binary coding operation.

Furthermore, in case that the binary coding operation is performed byutilizing the above-described contour binary-coding process, since onlythe portion where the color (density) thereof is changed may berepresented as the black data, and also the remaining same color(density) portion may be represented as the white data, the contours ofthe characters can be clearly represented even when both the colors ofthe characters and also background have nearly equal densities. Also incase that a pattern or the like constructed of a plurality of colors isbinary-coded, the boundary portions of the respective colors arerepresented as black and also the area having the same color isrepresented as white so that the shape of the pattern can be correctlyor accurately represented.

Other Binary-Code Image Forming Apparatus

FIG. 8 is a schematic block diagram of a binary coding circuit accordingto another preferred embodiment of the invention.

An image signal which is obtained from, for instance, the image sensor23 of the compact copying machine shown in FIG. 3, and supplied via theamplifying/signal-processing unit 30, is supplied to a firstdifferential circuit 100 and second differential circuit 101.

These first and second differential circuits 100 and 101 calculate thedifferential of the above-described image signal based upon differenttime constants τ₁ and τ₂ (note τ₁ is greater than τ₂).

The differential value signal output from the first differential circuit100 is supplied to a minus (negative) terminal of the first comparator102 and also a plus (positive) terminal of a second comparator 103. Onthe other hand, the differential value signal output from the seconddifferential circuit 101 is supplied to a minus (negative) terminal of athird comparator 104 and a plus (positive) terminal of a fourthcomparator 105.

Now, it should be noted that a binary-coding reference voltage "VH1" isapplied to a plus terminal of the first comparator 102, and anotherbinary-coding reference voltage "VL1" is applied to a minus terminal ofthe second comparator 103, a further binary-coding reference voltage"VH2" is applied to a plus terminal of the third comparator 104, andmoreover a still further binary-coding reference voltage "VL2" isapplied to a minus terminal of the fourth comparator 105. In this case,the respective voltage levels of these binary-coding reference voltages"VH1", "VL1,""VH2", and "VL2" have the following relationships:

    VH1>VH2>0>VL2>VL1.

The outputs from the first and second comparators 102 and 103 aresupplied to a set terminal and a reset terminal of a first holdingcircuit 106, respectively. The outputs from the third and fourthcomparators 104 and 107 are furnished to a set terminal and a resetterminal of a second holding circuit 107, respectively.

It should be understood that the above-described first differentialcircuit 100, first and second comparators 102 and 103, and further thefirst holding circuit 106 constitute a binary-coding circuit forobtaining a binary output for those portions of an image signalinvolving changes of relatively large magnitude. On the other hand, theabove-described second differential circuit 101, third and fourthcomparators 104 and 105, and also second holding circuit 107 constitutea binary-coding circuit for obtaining a binary-coded output for thoseportions in response to an image signal involving changes of arelatively small magnitude.

Then, the outputs derived from the first holding circuit 106 and secondholding circuit 107 are supplied to an OR gate 108. An output of this ORgate 108 is supplied as a final binary-coded signal of this image signalto, for instance, the second image data memory unit 36.

Binary-Coding Operation of Second Binary Coding Circuit

Referring now to FIGS. 9A to 9F representing output signal waveforms, abinary-coding operation of the above-described binary-coding circuitwill be described.

First, the image signal represented in FIG. 9A is PG,34 supplied to thefirst and second differential circuits 100 and 101 so as to producedifferential output signals represented in FIGS. 9B and 9D based on therespective time constants τ₁ and τ₂.

Since the time constant τ₁ of the first differential circuit 100 islarge, a differential output of the image signal is obtained therefromin response to the relatively large variations of the image signal.

On the other hand, since the time constant τ₂ of the second differentialcircuit 101 is small, a differential output of the image signal isobtained-therefrom in response to the relatively small variations of theiamge signal.

The output of the first differential circuit 100 is supplied to thefirst and second comparators 102 and 103, and compared with thecorresponding reference voltage "VH1" and "VL1". The first comparator102 outputs a low level signal when the above-described differentialoutput exceeds the reference voltage "VH1". In other words, the imagesignal changes from the black level side to a white level side. On theother hand, the second comparator 103 outputs a low level signal in casethat the differential output falls below the reference voltage VL1,namely the image signal is varied from the white level into the blacklevel.

Then, the outputs from the first and second comparators 102 and 103 aresupplied to the first hold circuit 106. This first hold circuit 106 isset when the low level signal is output from the first comparator 102,and reset when another low level signal is output from the secondcomparator 103. In other words, the first hold circuit 106 is set underthe condition that the black level of the image signal is varied to thewhite level thereof, whereas this circuit 106 is reset under thecondition that the white level of the image signal is changed into theblack level. As a consequence, a roughly binary-coded image signalrepresented in FIG. 9C is obtained.

On the other hand, the differential output from the second differentialcircuit 101 is supplied to the third and fourth comparators 104 and 105so as to be compared with the corresponding reference voltages VH2 andVL2. It should be noted that the third comparator 104 outputs the lowlevel signal when the differential output exceeds the reference voltageVH2. Since this differential output responds to small changes in theimage signal and "VH2" is lower than "VH1", this differential outputalso responds to the small changes of the image signal from the blacklevel to the white level. Similarly, the fourth comparator 105 respondsto small changes of the image signal from the white level to the blacklevel, as compared with the second comparator 103.

The outputs from the third and fourth comparators 104 and 105 aresupplied to the second hold circuit 107. As a result, the output signalrepresented in FIG. 9E of this second hold circuit 107 becomes abinary-coded signal in response to the small changes in the imagesignal.

Thereafter, the outputs of the first and second hold circuits 106 and107 are supplied to the OR gate 108 so as to be added to each other.Then, the summed signal is output as the final binary-coded image signalshown in FIG. 9F. That is, the binary-coded signal output from the ORgate 108 has been roughly binary-coded in such a manner that this signalrepresents an original document having a large white portion. To thecontrary, the finely binary-coded signal is produced from such as imagesignal having a large black portion.

The above-described binary-coding circuit is useful for reading, forinstance, such an original document having characters written on a whitebackground, so that a space portion of the original document having thewhite background becomes a binary-coded output from which signal changescaused by the noise and smear of the original document have been cutout. A portion of the original document having a relatively significantblack portion can be obtained as the binary-coded output representingthe fine information.

Also, the above-described binary coding circuit may be applied to, forinstance, such an original document where a white character is drawn ona black background by substituting the OR gate 108 with an AND gate.

What is claimed is:
 1. An image processing apparatus comprising:imagesensing means having a plurality of photoelectric converting elementsfor outputting electric signals of an optical image converted by saidphotoelectric converting elements; difference-data producing means forproducing difference-data according to a difference between amounts ofat least two electric signals produced by said photoelectric convertingelements arranged adjacent to each other; binary data producing meansfor producing binary data in response to said difference-data producedby said difference-data producing means and a threshold value; selectingmeans for selecting a predetermined number of said difference-dataproduced by said difference-data producing means; and arithmetic meansfor producing an average value of said difference-data selected by saidselecting means; wherein said binary data producing means includes meansfor producing said binary data in response to at least one of saiddifference-data selected by said selecting means with the thresholdvalue being determined by said average value.
 2. The image processingapparatus of claim 1, further comprising:analog-to-digital convertingmeans for converting said electric signals output from said imagesensing means into digital data corresponding to amounts of saidelectric signals produced by said photoelectric converting elements;wherein said difference-data producing means includes means forproducing difference-data according to a difference between at least twodigital data obtained by said analog-to-digital converting means.
 3. Animage processing apparatus comprising:image sensing means having aplurality of photoelectric converting elements for outputting electricsignals of an optical image converted by said photoelectric convertingelements; difference-data producing means for producing difference-dataaccording to a difference between amounts of at least two electricsignals produced by said photoelectric converting elements arrangedadjacent to each other; binary data producing means for producing binarydata in response to said difference-data produced by saiddifference-data producing means with a threshold value; wherein saidphotoelectric converting means are arranged in rows and columns in amatrix form; said difference-data producing means includes:firstdifference-data producing means for producing first difference-dataaccording to a difference between the amounts of at least two electricsignals produced by said photoelectric elements arranged in a row;second difference-data producing means for producing seconddifference-data according to a difference between the amounts of atleast two electric signals produced by said photoelectric elementsarranged in a column; and addition means for adding firstdifference-data to second difference-data so as to make saiddifference-data.